//
//  BLWebViewController.m
//  百思不得姐
//
//  Created by hbl on 16/3/30.
//  Copyright © 2016年 hbl. All rights reserved.
//

#import "BLWebViewController.h"
#import "SVProgressHUD.h"
@interface BLWebViewController ()<UIWebViewDelegate>
@property (weak, nonatomic) IBOutlet UIWebView *myWeb;
@property (weak, nonatomic) IBOutlet UIBarButtonItem *back;
@property (weak, nonatomic) IBOutlet UIBarButtonItem *forward;

@end

@implementation BLWebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.myWeb.delegate = self;
    [self.myWeb loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.url]]];
    [SVProgressHUD show];
}

- (void)webViewDidFinishLoad:(UIWebView *)webView
{
    self.back.enabled = webView.canGoBack;
    self.forward.enabled = webView.canGoForward;
    [SVProgressHUD dismiss];
}

@end
